import axios from '../utils/http' // 导入http中创建的axios实例
import { Base64 } from '../utils/base'

let baseObj = new Base64()
const base_url = process.env.BASE_API
const inter_url = '/proxy/cam/proxy/common?api='

const taskApi = {
  // 获取任务列表
  getCustomerTaskList(params) {
    let url = 'CustomerSolicitFacade-getCustomerTaskList'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params)
  },

  // 查询任务表数据详情
  getCustomerTaskById(params) {
    let url = 'CustomerSolicitFacade-getCustomerTaskById'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params)
  },

  // 新增任务表跟踪记录
  addNewCustomerTaskFollow(params) {
    let url = 'CustomerSolicitFacade-addNewCustomerTaskFollow'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params)
  },

  // 任务转交
  customerTaskFollow(params) {
    let url = 'CustomerSolicitFacade-customerTaskFollow'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params)
  },

  // 获取任务新增数跟跟进数
  getTaskAddAndFollowCount(params) {
    let url = 'CustomerSolicitFacade-getTaskAddAndFollowCount'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params)
  },

  // 获取逾期数据明细，战败数据明细
  getTaskDataByPerson(params) {
    let url = 'CustomerSolicitFacade-getTaskDataByPerson'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params)
  },

  // 任务数据统计
  taskDataCal(params) {
    let url = 'CustomerSolicitFacade-taskDataCal'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params)
  },
  // 任务数据统计
  getCustomerTaskWeekCount(params) {
    let url = 'CustomerSolicitFacade-getCustomerTaskWeekCount'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params)
  },

  // 人员跟进情况统计表
  getPersonTaskCount(params) {
    let url = 'CustomerSolicitFacade-getPersonTaskCount'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params)
  },
  // 获取客户群信息
  getCustomerGroupInfo(params) {
    /*  */
    let url = 'CustomerSolicitFacade-getCustomerGroupInfo'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params)
  },
  // 获取群成员信息
  getMemberInfo(params) {
    let url = 'CustomerSolicitFacade-getMemberInfo'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params)
  },
  getCustomerTaskHisFollow(params) {
    let url = 'CustomerSolicitFacade-getCustomerTaskHisFollow'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params)
  },
  // 获取任务列表
  taskQueryList(params) {
    let url = 'CustomerSolicitFacade-taskQueryList'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params)
  },
  // 获取车辆附件列表
  getCarAttachmentList(params) {
    let url = 'CustomerSolicitFacade-getCarAttachmentList'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params)
  },
}

export default taskApi
